package routers

import (
	"net/http"
	"shqsoft.cn/pasnj/base"
	"shqsoft.cn/pasnj/entity"

	"github.com/labstack/echo"
)

//IndexAllRouter 查询指标配置
func IndexAllRouter(c echo.Context) error {
	//查询审批表
	var indexList []entity.ConfIndex
	err := base.DB.Order("TXID,TPID,INID").Find(&indexList).Error
	if err != nil {
		return echo.NewHTTPError(http.StatusBadRequest, err.Error())
	}
	return c.JSON(http.StatusOK, indexList)
}
